home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / doc / usr_90.txt < prev    next >
Encoding:
Text File  |  2001-09-26  |  17.1 KB  |  500 lines

  1. *usr_90.txt*    For Vim version 6.0.  Last change: 2001 Sep 09
  2.  
  3.              VIM USER MANUAL - by Bram Moolenaar
  4.  
  5.                 Installing Vim
  6.  
  7.  
  8. Before you can use Vim you have to install it.  Depending on your system it's
  9. simple or easy.  This chapter gives a few hints and also explains how
  10. upgrading to a new version is done.
  11.  
  12. |90.1|    Unix
  13. |90.2|    MS-Windows
  14. |90.3|    Upgrading
  15. |90.4|    Common installation issues
  16. |90.5|    Uninstalling Vim
  17.  
  18.  Previous chapter: |usr_45.txt|  Select your language
  19. Table of contents: |usr_toc.txt|
  20.  
  21. ==============================================================================
  22. *90.1*    Unix
  23.  
  24. First you have to decide if you are going to install Vim system-wide or for a
  25. single user.  The installation is almost the same, but the directory where Vim
  26. is installed in differs.
  27.    For a system-wide installation the base directory "/usr/local" is often
  28. used.  But this may be different for your system.  Try finding out where other
  29. packages are installed.
  30.    When installing for a single user, you can use your home directory as the
  31. base.  The files will be placed in subdirectories like "bin" and "shared/vim".
  32.  
  33.  
  34. FROM A PACKAGE
  35.  
  36. You can get precompiled binaries for many different UNIX systems.  There is a
  37. long list with links on this page:
  38.  
  39.     http://www.vim.org/binaries.html ~
  40.  
  41. Volunteers maintain the binaries, so they are often out of date.  It is a
  42. good idea to compile your own UNIX version from the source.  Also, creating
  43. the editor from the source allows you to control which features are compiled.
  44. This does require a compiler though.
  45.  
  46. If you have a Linux distribution, the "vi" program is probably a minimal
  47. version of Vim.  It doesn't do syntax highlighting, for example.  Try finding
  48. another Vim package in your distribution, or search on the web site.
  49.  
  50.  
  51. FROM SOURCES
  52.  
  53. To compile and install Vim, you will need the following:
  54.  
  55.     -  A C compiler (GCC preferred)
  56.     -  The GZIP program (you can get it from www.gnu.org)
  57.     -  The Vim source and runtime archives
  58.  
  59. To get the Vim archives, look in this file for a mirror near you, this should
  60. provide the fastest download:
  61.  
  62.     ftp://ftp.vim.org/pub/vim/MIRRORS ~
  63.  
  64. Or use the home site ftp.vim.org, if you think it's fast enough.  Go to the
  65. "unix" directory and you'll find a list of files there.  The version number is
  66. embedded in the file name.  You will want to get the most recent version.
  67.    You can get the files for Unix in two ways: One big archive that contains
  68. everything, or four smaller ones that each fit on a floppy disk.  For version
  69. 6.0 the single big one is called:
  70.  
  71.     vim-6.0.tar.bz2 ~
  72.  
  73. You need the bzip2 program to uncompress it.  If you don't have it, get the
  74. four smaller files, which can be uncompressed with gzip.  For Vim 6.0 they are
  75. called:
  76.  
  77.     vim-6.0-src1.tar.gz ~
  78.     vim-6.0-src2.tar.gz ~
  79.     vim-6.0-rt1.tar.gz ~
  80.     vim-6.0-rt2.tar.gz ~
  81.  
  82.  
  83. COMPILING
  84.  
  85. First create a top directory to work in, for example: >
  86.  
  87.     mkdir ~/vim
  88.     cd ~/vim
  89.  
  90. Then unpack the archives there.  If you have the one big archive, you unpack
  91. it like this: >
  92.  
  93.     bzip2 -d -c path/vim-6.0.tar.bz2 | tar xf -
  94.  
  95. Change "path" to where you have downloaded the file.
  96.  
  97.     gzip -d path/vim-6.0-src1.tar.gz | tar xf -
  98.     gzip -d path/vim-6.0-src2.tar.gz | tar xf -
  99.     gzip -d path/vim-6.0-rt1.tar.gz | tar xf -
  100.     gzip -d path/vim-6.0-rt2.tar.gz | tar xf -
  101.  
  102. If you are satisfied with getting the default features, and your environment
  103. is setup properly, you should be able to compile Vim with just this: >
  104.  
  105.     cd vim60/src
  106.     make
  107.  
  108. The make program will run configure and compile everything.  Further on we
  109. will explain how to compile with different features.
  110.    If there are errors while compiling, carefully look at the error messages.
  111. There should be a hint about what went wrong.  Hopefully you will be able to
  112. correct it.  You might have to disable some features to make Vim compile.
  113. Look in the Makefile for specific hints for your system.
  114.  
  115.  
  116. TESTING
  117.  
  118. Now you can check if compiling worked OK: >
  119.  
  120.     make test
  121.  
  122. This will run a sequence of test scripts to verify that Vim works as expected.
  123. Vim will be started many times and all kinds of text and messages flash by.
  124. If it is alright you will finally see:
  125.  
  126.     test results: ~
  127.     ALL DONE ~
  128.  
  129. If there are one or two messages about failed tests, Vim might still work, but
  130. not perfectly.  If you see a lot of error messages or Vim doesn't finish until
  131. the end, there must be something wrong.  Either try to find out yourself, or
  132. find someone who can solve it.  You could look in the |maillist-archive| for a
  133. solution.  If everything else fails, you could ask in the vim |maillist| if
  134. someone can help you.
  135.  
  136.  
  137. INSTALLING
  138.                             *install-home*
  139. If you want to install in your home directory, edit the Makefile and search
  140. for a line:
  141.  
  142.     #prefix = $(HOME) ~
  143.  
  144. Remove the # at the start of the line.
  145.    When installing for the whole system, Vim has most likely already selected
  146. a good installation directory for you.  You can also specify one, see below.
  147. You need to become root for the following.
  148.  
  149. To install Vim do: >
  150.  
  151.     make install
  152.  
  153. That should move all the relevant files to the right place.  Now you can try
  154. running vim to verify that it works.  Use two simple tests to check if Vim can
  155. find its runtime files: >
  156.  
  157.     :help
  158.     :syntax enable
  159.  
  160. If this doesn't work, use this command to check where Vim is looking for the
  161. runtime files: >
  162.  
  163.     :echo $VIMRUNTIME
  164.  
  165. You can also start Vim with the "-V" argument to see what happens during
  166. startup: >
  167.  
  168.     vim -V
  169.  
  170. Don't forget that the user manual assumes you Vim in a certain way.  After
  171. installing Vim, follow the instructions at |not-compatible| to make Vim work
  172. as assumed in this manual.
  173.  
  174.  
  175. SELECTING FEATURES
  176.  
  177. Vim has many ways to select features.  One of the simple ways is to edit the
  178. Makefile.  There are many directions and examples.  Often you can enable or
  179. disable a feature by uncommenting a line.
  180.    An alternative is to run "configure" separately.  This allows you to
  181. specify configuration options manually.  The disadvantage is that you have to
  182. figure out what exactly to type.
  183.    Some of the most interesting configure arguments follow.  These can also be
  184. enabled from the Makefile.
  185.  
  186.     --prefix={directory}        Top directory where to install Vim.
  187.  
  188.     --with-features=tiny        Compile with many features disabled.
  189.     --with-features=small        Compile with some features disabled.
  190.     --with-features=big        Compile with more features enabled.
  191.     --with-features=huge        Compile with most features enabled.
  192.                     See |+feature-list| for which feature
  193.                     is enabled in which case.
  194.  
  195.     --enable-perlinterp        Enable the Perl interface.  There are
  196.                     similar arguments for ruby, python and
  197.                     tcl.
  198.  
  199.     --disable-gui            Do not compile the GUI interface.
  200.     --without-x            Do not compile X-windows features.
  201.                     When both of these are used, Vim will
  202.                     not connect to the X server, which
  203.                     makes startup faster.
  204.  
  205. To see the whole list use: >
  206.  
  207.     ./configure --help
  208.  
  209. You can find a bit of explanation for each feature, and links for more
  210. information here: |feature-list|.
  211.    For the adventurous, edit the file "feature.h".  You can also change the
  212. source code yourself!
  213.  
  214. ==============================================================================
  215. *90.2*    MS-Windows
  216.  
  217. There are two ways to install the Vim program for Microsoft Windows.  You can
  218. uncompress several archives, or use a self-installing big archive.  Most users
  219. with fairly recent computers will prefer the second method.  For the first
  220. one, you will need:
  221.  
  222.     - An archive with binaries for Vim.
  223.     - The Vim runtime archive.
  224.     - A program to unpack the zip files.
  225.  
  226. To get the Vim archives, look in this file for a mirror near you, this should
  227. provide the fastest download:
  228.  
  229.     ftp://ftp.vim.org/pub/vim/MIRRORS ~
  230.  
  231. Or use the home site ftp.vim.org, if you think it's fast enough.  Go to the
  232. "pc" directory and you'll find a list of files there.  The version number is
  233. embedded in the file name.  You will want to get the most recent version.
  234. We will use "60" here, which is version 6.0.
  235.  
  236.     gvim60.exe        The self-installing archive.
  237.  
  238. This is all you need for the second method.  Just launch the executable, and
  239. follow the prompts.
  240.  
  241. For the first method you must chose one of the binary archives.  These are
  242. available:
  243.  
  244.     gvim60.zip        The normal MS-Windows GUI version.
  245.     gvim60ole.zip        The MS-Windows GUI version with OLE support.
  246.                 Uses more memory, supports interfacing with
  247.                 other OLE applications.
  248.     vim60w32.zip        32 bit MS-Windows console version.  For use in
  249.                 a Win NT/2000/XP console.  Does not work well
  250.                 on Win 95/98.
  251.     vim60d32.zip        32 bit MS-DOS version.  For use in the
  252.                 Win 95/98 console window.
  253.     vim60d16.zip        16 bit MS-DOS version.  Only for old systems.
  254.                 Does not support long filenames.
  255.  
  256. You only need one of them.  Although you could install both a GUI and a
  257. console version.  You always need to get the archive with runtime files.
  258.  
  259.     vim60rt.zip        The runtime files.
  260.  
  261. Use your un-zip program to unpack the files.  For example, using the "unzip"
  262. program: >
  263.  
  264.     cd c:\
  265.     unzip path\gvim60.zip
  266.     unzip path\vim60rt.zip
  267.  
  268. This will unpack the files in the directory "c:\vim\vim60".  If you already
  269. have a "vim" directory somewhere, you will want to move to the directory just
  270. above it.
  271.    Now change to the "vim\vim60" directory and run the install program: >
  272.  
  273.     install
  274.  
  275. Carefully look through the messages and select the options you want to use.
  276. If you finally select "do it" the install program will carry out the actions
  277. you selected.
  278.    The install program doesn't move the runtime files.  They remain where you
  279. unpacked them.
  280.  
  281. In case you are not satisfied with the features included in the supplied
  282. binaries, you could try compiling Vim yourself.  Get the source archive from
  283. the same location as where the binaries are.  You need a compiler for which a
  284. makefile exists.  Microsoft Visual C works, but is expensive.  The Free
  285. Borland command-line compiler 5.5 can be used, as well as the free MingW and
  286. Cygwin compilers.  Check the file src/INSTALLpc.txt for hints.
  287.  
  288. ==============================================================================
  289. *90.3*    Upgrading
  290.  
  291. If you are running one version of Vim and want to install another, here is
  292. what to do.
  293.  
  294.  
  295. UNIX
  296.  
  297. When you type "make install" the runtime files will be copied to a directory
  298. which is specific for this version.  Thus they will not overwrite a previous
  299. version.  This makes it possible to use two or more versions next to
  300. each other.
  301.    The executable "vim" will overwrite an older version.  If you don't care
  302. about keeping the old version, running "make install" will work fine.  You can
  303. delete the old runtime files manually.  Just delete the directory with the
  304. version number in it and all files below it.  Example: >
  305.  
  306.     rm -rf /usr/local/share/vim/vim58
  307.  
  308. There are normally no changed files below this directory.  If you did change
  309. the "filetype.vim" file, for example, you better merge the changes into the
  310. new version before deleting it.
  311.  
  312. If you are careful and want to try out the new version for a while before
  313. switching to it, install the new version under another name.  You need to
  314. specify a configure argument.  For example: >
  315.  
  316.     ./configure --with-vim-name=vim6
  317.  
  318. Before running "make install", you could use "make -n install" to check that
  319. no valuable existing files are overwritten.
  320.    When you finally decide to switch to the new version, all you need to do is
  321. to rename the binary to "vim".  For example: >
  322.  
  323.     mv /usr/local/bin/vim6 /usr/local/bin/vim
  324.  
  325.  
  326. MS-WINDOWS
  327.  
  328. Upgrading is mostly equal to installing a new version.  Just unpack the files
  329. in the same place as the previous version.  A new directory will be created,
  330. e.g., "vim61", for the files of the new version.  Your runtime files, vimrc
  331. file, viminfo, etc. will be left alone.
  332.    If you want to run the new version next to the old one, you will have to do
  333. some handwork.  Don't run the install program, it will overwrite a few files
  334. of the old version.  Execute the new binaries by specifying the full path.
  335. The program should be able to automatically find the runtime files for the
  336. right version.  However, this won't work if you set the $VIMRUNTIME variable
  337. somewhere.
  338.    If you are satisfied with the upgrade, you can delete the files of the
  339. previous version.  See |90.5|.
  340.  
  341. ==============================================================================
  342. *90.4*    Common installation issues
  343.  
  344. This section describes some of the common problems that occur when installing
  345. Vim and suggests some solutions.  It also contains answers to many
  346. installation questions.
  347.  
  348.  
  349. Q: I Do Not Have Root Privileges.  How Do I Install Vim? (Unix)
  350.  
  351. Use the following configuration command to install Vim in a directory called
  352. $HOME/vim: >
  353.  
  354.     ./configure --prefix=$HOME
  355.  
  356. This gives you a personal copy of Vim.  You need to put $HOME/bin in your
  357. path to execute the editor.  Also see |install-home|.
  358.  
  359.  
  360. Q: The Colors Are Not Right on My Screen. (Unix)
  361.  
  362. Check your terminal settings by using the following command in a shell: >
  363.  
  364.     echo $TERM
  365.  
  366. If the terminal type listed is not correct, fix it.  For more hints, see
  367. |06.2|.  Another solution is to always use the GUI version of Vim, called
  368. gvim.  This avoids the need for a correct terminal setup.
  369.  
  370.  
  371. Q: My Backspace And Delete Keys Don't Work Right
  372.  
  373. The definition of what key sends what code is very unclear for backspace <BS>
  374. and Delete <Del> keys.  First of all, check your $TERM setting.  If there is
  375. nothing wrong with it, try this: >
  376.  
  377.     :set t_kb=^V<BS>
  378.     :set t_kD=^V<Del>
  379.  
  380. In the first line you need to press CTRL-V and then hit the backspace key.
  381. In the second line you need to press CTRL-V and then hit the Delete key.
  382. You can put these lines in your vimrc file, see |05.1|.  A disadvantage is
  383. that it won't work when you use another terminal some day.  Look here for
  384. alternate solutions: |:fixdel|.
  385.  
  386.  
  387. Q: I Am Using RedHat Linux.  Can I Use the Vim That Comes with the System?
  388.  
  389. By default RedHat installs a minimal version of Vim.  Check your RPM packages
  390. for something named "Vim-enhanced-version.rpm" and install that.
  391.  
  392.  
  393. Q: How Do I Turn Syntax Coloring On?
  394.  
  395. Use the following command: >
  396.  
  397.     :syntax enable
  398.  
  399. See chapter 6 for information: |usr_06.txt|.
  400.  
  401.  
  402. Q: What Is a Good vimrc File to Use?
  403.  
  404. See the www.vim.org Web site for several good examples.
  405.  
  406.  
  407. Q: Where Do I Find a Good Vim Plugin?
  408.  
  409. See the Vim-online site: http://vim.sf.net.  Many users have uploaded useful
  410. Vim scripts and plugins there.
  411.  
  412.  
  413. Q: Where Do I Find More Tips?
  414.  
  415. See the Vim-online site: http://vim.sf.net.  There is an archive with hints
  416. from Vim users.  You might also want to search in the |maillist-archive|.
  417.  
  418. ==============================================================================
  419. *90.5*    Uninstalling Vim
  420.  
  421. In the unlikely event you want to uninstall Vim completely, this is how you do
  422. it.
  423.  
  424.  
  425. UNIX
  426.  
  427. When you installed Vim as a package, check your package manager to find out
  428. how to remove the package again.
  429.    If you installed Vim from sources you can use this command: >
  430.  
  431.     make uninstall
  432.  
  433. However, if you have deleted the original files or you used an archive that
  434. someone supplied, you can't do this.  Do delete the files manually, here is an
  435. example for when "/usr/local" was used as the root: >
  436.  
  437.     rm -rf /usr/local/share/vim/vim60
  438.     rm /usr/local/bin/eview
  439.     rm /usr/local/bin/evim
  440.     rm /usr/local/bin/ex
  441.     rm /usr/local/bin/gview
  442.     rm /usr/local/bin/gvim
  443.     rm /usr/local/bin/gvim
  444.     rm /usr/local/bin/gvimdiff
  445.     rm /usr/local/bin/rgview
  446.     rm /usr/local/bin/rgvim
  447.     rm /usr/local/bin/rview
  448.     rm /usr/local/bin/rvim
  449.     rm /usr/local/bin/rvim
  450.     rm /usr/local/bin/view
  451.     rm /usr/local/bin/vim
  452.     rm /usr/local/bin/vimdiff
  453.     rm /usr/local/bin/vimtutor
  454.     rm /usr/local/bin/xxd
  455.     rm /usr/local/man/man1/eview.1
  456.     rm /usr/local/man/man1/evim.1
  457.     rm /usr/local/man/man1/ex.1
  458.     rm /usr/local/man/man1/gview.1
  459.     rm /usr/local/man/man1/gvim.1
  460.     rm /usr/local/man/man1/gvimdiff.1
  461.     rm /usr/local/man/man1/rgview.1
  462.     rm /usr/local/man/man1/rgvim.1
  463.     rm /usr/local/man/man1/rview.1
  464.     rm /usr/local/man/man1/rvim.1
  465.     rm /usr/local/man/man1/view.1
  466.     rm /usr/local/man/man1/vim.1
  467.     rm /usr/local/man/man1/vimdiff.1
  468.     rm /usr/local/man/man1/vimtutor.1
  469.     rm /usr/local/man/man1/xxd.1
  470.  
  471.  
  472. MS-WINDOWS
  473.  
  474. If you installed Vim with the self-installing archive you can run
  475. the "uninstall-gui" program located in the same directory as the other Vim
  476. programs, e.g. "c:\vim\vim60".  You can also launch it from the Start menu if
  477. installed the Vim entries there.  This will remove most of the files, menu
  478. entries and desktop shortcuts.  Some files may remain however, as they need a
  479. Windows restart before being deleted.
  480.    You will be given the option to remove the whole "vim" directory.  It
  481. probably contains your vimrc file and other runtime files that you created, so
  482. be careful.
  483.  
  484. Else, if you installed Vim with the zip archives, the preferred way is to use
  485. the "uninstal" program (note the missing l at the end).  You can find it in
  486. the same directory as the "install" program, e.g., "c:\vim\vim60".  This
  487. should also work from the usual "install/remove software" page.
  488.    However, this only removes the registry entries for Vim.  You have to
  489. delete the files yourself.  Simply select the directory "vim\vim60" and delete
  490. it recursively.  There should be no files there that you changed, but you
  491. might want to check that first.
  492.    The "vim" directory probably contains your vimrc file and other runtime
  493. files that you created.  You might want to keep that.
  494.  
  495. ==============================================================================
  496.  
  497. Table of contents: |usr_toc.txt|
  498.  
  499. Copyright: see |manual-copyright|  vim:tw=78:ts=8:ft=help:norl:
  500.